<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //复杂数据类型传参
        function Person(name) {
            this.name = name;
        }

        function f1(x) { //x=p
            console.log(x.name); //2.这个输出什么?   刘德华
            x.name = '张学友';
            console.log(x.name); //3.这个输出什么?    张学友
        }
        var p = new Person("刘德华") //1.这个输出什么?(调用构造函数) 
        console.log(p.name); //刘德华
        f1(p);
        console.log(p.name); //4.这个输出什么?   张学友
    </script>
</head>

<body>

</body>

</html>